<div>
  <%= link_to "Statement",:action =>"view_mystatement" %>
  <%= link_to "Badday",:action =>"view_mybadday" %>
  <%= link_to "Question",:action =>"view_myquestion" %>
</div>
<div class="clear c25">&nbsp;</div>
<div class="boxy">
  <a class="subhead">Category</a>
  <div class="scroll">
    <%if !@category.blank?%>
      <%= link_to "All",{:action =>"view_mybadday"} %>
      <%  @category.each do |cat|%>
        <%= link_to "#{cat.title}",{:action =>"view_mybadday",:cat=>"#{cat.id}"} %>
      <%end%>
    <%end%>
  </div>
</div>
<div class="clear c25">&nbsp;</div>
<div class="boxy">
  <a class="subhead">Bad Day Story</a>
  <div class="scroll">
    <% if !@mybadday.nil? %>
      <% @mybadday.each do |bd| %>
        <p><b><%= bd.message %></b></p>
        <% if !bd.alias.nil? %>
          <p>created at :<%= bd.created_at %> - by :<%=  bd.alias %></p>
          <p>agree : <%= bd.agree %> | disagree : <%= bd.disagree %> </p>
        <% if bd.badday_emailer.blank?%>
		  <p><%= link_to "Email me",{:controller =>"workspaces",:action =>"badday_emailer",:with =>bd.id} %></p>
        <%else%>
		 <p><%= link_to "Stop",{:controller =>"workspaces",:action =>"badday_emailer",:without =>bd.id} %></p>
		<%end%>
		<%else%>
          <p>created at :<%= bd.user.created_at %> - by :<%=  bd.user.login %></p>
          <p>agree : <%= bd.agree %> | disagree : <%= bd.disagree %> </p>
        <% if bd.badday_emailer.blank?%>
		  <p><%= link_to "Email me",{:controller =>"workspaces",:action =>"badday_emailer",:with =>bd.id} %></p>
        <%else%>
		 <p><%= link_to "Stop",{:controller =>"workspaces",:action =>"badday_emailer",:without =>bd.id} %></p>
		<%end%>
		<%end%>
      <%end%>
    <%end%>
  </div>
</div>